package com.qf.userweb.service.impl;

import com.qf.userweb.entity.LoginUser;
import com.qf.userweb.entity.User;
import com.qf.userweb.entity.UserDTO;
import com.qf.userweb.mapper.UserMapper;
import com.qf.userweb.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;

    @Override
    public User login(LoginUser loginUser) {
        User user = userMapper.login(loginUser);
        return user;
    }

    @Override
    public List<User> list(UserDTO userDTO) {
        return userMapper.list(userDTO);
    }

    @Override
    public int batchDelete(List<Integer> ids) {
        return userMapper.delBatch(ids);
    }

    @Override
    public int add(User user) {
        return userMapper.add(user);
    }


}
